<!--首页主要内容-->
<main id="content" role="main">
  <div class="container clearfix">
    <div class="mod mod-headline">
      <h1 class="b"><?= $title ?></h1>
      <p><?= $product_title ?></p>
    </div>
    <div class="g-row g-layout-responsive-66-33">
      <div class="g-col g-col-1">
        <div class="par parsys">
          <?php if ($product_video) { ?>
            <div class="detail-video">
              <video id="detail_video_1" class="video-js vjs-default-skin vjs-big-play-centered gu-media--video" controls
                     preload="auto"
                     poster="" data-setup="{}">
                <source src="<?= $product_video ?>" type='video/mp4'/>
                <p class="vjs-no-js">
                  To view this video please enable JavaScript, and consider upgrading to a web browser that
                  <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
                </p>
              </video>
            </div>
          <?php } ?>
          <?php if (isset($product_content) && !empty($product_content)) { ?>
            <div class="textimage">
              <div class="mod mod-text-image skin-text-only clearfix">
                <div class="mod mod-media-lightbox">
                  <div class="content rich">
                    <?= $product_content[0] ?>
                  </div>
                </div>
              </div>
            </div>
          <?php } ?>
          <div class="accordion">
            <div class="mod mod-accordion " data-connectors="media,ajax_replacer">
              <div class="parsys accordionItems">
                <?php
                if (isset($product_tab_list) && !empty($product_tab_list)) {
                  foreach ($product_tab_list as $tab_k => $tab_value) {
                    if (!empty($tab_value['field_product_tab_title'])) {
                      ?>
                      <div class="item">
                        <div class="accordion-element-wrapper ">
                          <section
                            class="accordion-element js-accordion-element ga-accordion <?= $tab_value['field_product_tab_down'] == 1 || $tab_k == 0 ? 'active' : '' ?> "
                            id="accordion_3"
                            title="">
                            <a href="javascript:;" class="accordion-link js-accordion-link">
                              <h3 class="headline"><?= htmlspecialchars_decode($tab_value['field_product_tab_title']) ?>
                                <i
                                  class="icon-arrow-down"></i>
                              </h3>
                            </a>
                            <div class="accordion-content js-accordion-content ">
                              <div class="parsys">
                                <!--有视频显示视频-->
                                <?php if (isset($tab_value['field_product_tab_video']) && !empty($tab_value['field_product_tab_video'])) {
                                  ?>
                                  <div class="detail-video">
                                    <video id="detail_video_1" class="video-js vjs-default-skin vjs-big-play-centered gu-media--video" controls
                                           preload="auto"
                                           poster="" data-setup="{}">
                                      <source src="<?= url($tab_value['field_product_tab_video']) ?>" type='video/mp4'/>
                                      <p class="vjs-no-js">
                                        To view this video please enable JavaScript, and consider upgrading to a web browser that
                                        <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
                                      </p>
                                    </video>
                                  </div>
                                  <?php
                                }
                                ?>
                                <!--有描述显示描述-->
                                <?php if (isset($tab_value['field_product_tab_content']) && !empty($tab_value['field_product_tab_content'])) {
                                  ?>
                                  <div class="textimage" style="margin-top: 20px;">
                                    <div class="mod mod-text-image skin-text-only clearfix">
                                      <div class="mod mod-media-lightbox">
                                        <div class="content rich">
                                          <?= $tab_value['field_product_tab_content'][0] ?>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <?php
                                }
                                ?>


                                <?php
                                if (isset($tab_value['product_tab_tab_list']) && !empty($tab_value['product_tab_tab_list'])) {
                                  foreach ($tab_value['product_tab_tab_list'] as $tab_tab_k => $tab_tab_value) {
                                    ?>


                                    <div class="mediagallery">
                                      <section class="mod mod-mediagallery clearfix">
                                        <div class="mod mod-text-image">
                                          <div class="image">
                                            <?php if ($tab_value['field_product_tab_image_show_type'] != 1) { ?>
                                              <a class="flyoutcarousel iframe"
                                                 href="#mediagallery-<?= $tab_tab_k ?>-<?= $tab_tab_value['item_id'] ?>">
                                                <img
                                                  src="<?= check_file_is_image($tab_tab_value['field_product_tab_tab_image_video'][0]['url']) ? $tab_tab_value['field_product_tab_tab_image_video'][0]['url'] : $tab_tab_value['field_product_tab_tab_image_video'][0]['thumb']; ?>">
                                                <span class="image_icon-search icon-search"></span>
                                              </a>
                                              <?php
                                            }
                                            else { ?>
                                              <img
                                                src="<?= check_file_is_image($tab_tab_value['field_product_tab_tab_image_video'][0]['url']) ? $tab_tab_value['field_product_tab_tab_image_video'][0]['url'] : $tab_tab_value['field_product_tab_tab_image_video'][0]['thumb']; ?>">
                                            <?php } ?>
                                          </div>
                                          <div class="mod mod-media-lightbox">
                                            <div class="content rich">
                                              <!--                                            标题-->
                                              <?php if (isset($tab_tab_value['field_product_tab_tab_title']) && !empty($tab_tab_value['field_product_tab_tab_title'])) {
                                                ?>
                                                <h3><?= htmlspecialchars_decode($tab_tab_value['field_product_tab_tab_title']) ?></h3>
                                                <?php
                                              }
                                              ?>
                                              <!--                                            描述-->
                                              <?php if (isset($tab_tab_value['field_product_tab_tab_content']) && !empty($tab_tab_value['field_product_tab_tab_content'])) {
                                                ?>
                                                <?= $tab_tab_value['field_product_tab_tab_content'] ?>
                                                <?php
                                              }
                                              ?>
                                              <!--                                            附件-->
                                              <?php if (isset($tab_tab_value['field_product_tab_tab_file']) && !empty($tab_tab_value['field_product_tab_tab_file'])) {
                                                ?>
                                                <p>
                                                  <i class="filetype-icon-pdf"></i>
                                                  <a class="b ga-pdf-download" href="<?= user_is_logged_in() ? $tab_tab_value['field_product_tab_tab_file'] : url('user/login',array('query' => array('destination' => request_path()))) ?>"
                                                     <?= user_is_logged_in() ? 'target="_blank"' : ''?>>查看详情</a> (<?= get_file_extension($tab_tab_value['field_product_tab_tab_file']) ?>,
                                                  <?= get_file_size($tab_tab_value['field_product_tab_tab_filesize']) ?>
                                                  MB)
                                                </p>
                                                <?php
                                              }
                                              ?>
                                            </div>
                                          </div>
                                          <div class="galleria-wrap">
                                            <div class="mod mod-mediagallery clearfix"
                                                 id="mediagallery-<?= $tab_tab_k ?>-<?= $tab_tab_value['item_id'] ?>">
                                              <div class="galleria lightbox">
                                                <?php foreach ($tab_tab_value['field_product_tab_tab_image_video'] as $v) { ?>
                                                  <a href="<?= $v['url'] ?>">
                                                    <img src="<?= check_file_is_image($v['url']) ? $v['url'] : $v['thumb'] ?>"
                                                         alt="<?= $v['content'] ?>"
                                                         data-description="<?= $v['content'] ?>"
                                                         class="<?= check_file_is_image($v['url']) ? '' : 'iframe' ?> thumb">
                                                  </a>
                                                  <?php
                                                }
                                                ?>

                                              </div>
                                            </div>
                                          </div>
                                        </div>
                                      </section>
                                    </div>
                                    <?php
                                  }
                                }
                                ?>
                              </div>
                            </div>
                          </section>
                        </div>
                      </div>
                      <?php
                    }
                  }
                }
                ?>
              </div>
            </div>
          </div>
        </div>
      </div>
      <?= nobel_get_righ_login() ?>
    </div>

    <div class="js-sticky-stop">
      <div class="parsys parBottom">
        <?php if (!empty($tags_news)) { ?>
          <div class="newsarticleteaser">
            <div class="mod mod-news-article-teaser">
              <div class="clearfix">
                <div class="g-layout-newsarticleteaser news-list">
                  <?php foreach ($tags_news as $k => $value) { ?>
                    <article class="g-col g-col-0 grid_4 ga-news-teaser clearfix"
                             title="From the President: Edentulous solutions">
                      <div class="g-layout-text-image-66-33">
                        <div class="rich g-col g-col-2">
                          <a class="b"
                             href="<?= $value['url'] ?>">
                            <h3 class="b"><?= $value['title'] ?></h3>
                          </a>
                          <div><?= $value['summary'] ?></div>
                        </div>
                      </div>
                    </article>
                  <?php } ?>
                </div>
              </div>
              <div class="footer">
                <a
                  href="<?= url('information-center') ?>"
                  class="b">查看更多</a>
              </div>
            </div>
          </div>
        <?php } ?>
        <?php if (isset($field_product_references) && !empty($field_product_references)) {
          ?>
          <div class="references">
            <div class="mod mod-references" id="references">
              <div class="b-disclaimer rich">
                <strong>参考文献</strong>
                <?php
                foreach ($field_product_references as $references_k => $references_value) {
                  $references_k = $references_k + 1;
                  ?>
                  <p id="footnote-<?= $references_k ?>"></p>
                  <p>
                    <b><?= $references_k ?><sup>&nbsp;</sup></b><?= $references_value['field_product_references_content'] ?>
                  </p>
                  <?php if (!empty($references_value['field_product_references_url'])) { ?>
                    <p>
                      <a href="<?= $references_value['field_product_references_url'] ?>" target="_blank">Read on PubMed</a>
                    </p>
                  <?php } ?>
                  <?php
                }
                ?>
              </div>
            </div>
          </div>
          <?php
        }
        ?>
      </div>
    </div>

  </div>
</main>